#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include <time.h>


void pause()
{
    int continuer = 1;
    SDL_Event event;
 
    while (continuer)
    {
        SDL_WaitEvent(&event);
        switch(event.type)
        {
            case SDL_KEYDOWN:
                continuer = 0;
        }
    }
}



void afficher_naruto_fixe(SDL_Surface * Naruto,SDL_Surface *ecran ,SDL_Rect* positionNaruto) {
   
    Naruto = SDL_LoadBMP("narutoface.bmp");
    SDL_SetColorKey(Naruto, SDL_SRCCOLORKEY, SDL_MapRGB(Naruto->format, 255, 255, 255));
    SDL_BlitSurface(Naruto, NULL, ecran, positionNaruto);


}



void afficher_naruto_avance(SDL_Surface * Naruto,SDL_Surface *ecran ,SDL_Rect* positionNaruto){
int i;
	for(i=0;i<10;i++){
    Naruto = SDL_LoadBMP("narutoface1.bmp");
    SDL_SetColorKey(Naruto, SDL_SRCCOLORKEY, SDL_MapRGB(Naruto->format,255, 255,255));
    SDL_BlitSurface(Naruto, NULL, ecran, positionNaruto);
    SDL_Flip(ecran);
SDL_Delay(300);
/*        SDL_FillRect(Naruto, NULL, SDL_MapRGB(Naruto->format, 255, 255, 255));
           SDL_BlitSurface(Naruto, NULL, ecran, positionNaruto);
		SDL_Flip(ecran);
		SDL_Delay(300);
*/ 
    Naruto = SDL_LoadBMP("narutoface2.bmp");
    SDL_SetColorKey(Naruto, SDL_SRCCOLORKEY, SDL_MapRGB(Naruto->format, 255, 255,255));
    SDL_BlitSurface(Naruto, NULL, ecran, positionNaruto);
    SDL_Flip(ecran);
SDL_Delay(300);
	}
}
